A logarithmic resolution method

General questions, debates, and rants about RPGs

Moderator: Moderators

Post Reply
User avatar
Murtak
Duke
Posts: 1577
Joined: Fri Mar 07, 2008 7:54 pm

A logarithmic resolution method

Post by Murtak »

This was touched upon in other threads ... basically it would be nice to have a system where each increase in the TN would lower the odds compared to the next lower TN by a fixed percentage. This is the best I have come up with so far:

Roll a d6.
If the die comes up as a 6, start over and add the result of that roll
If the die comes up as a 5, roll another die, subtract 1 and add that to the result
If the die comes up less than 5, just take that number

Basically you use SR3 rules, but 5 explode too, except they only add the "explode result" minus 1. This gives you probability changes of:

1 to 2: 0.83407
2 to 3: 0.801131799489252
3 to 4: 0.751840766237653
4 to 5: 0.66698515068275
5 to 6: 0.914020532410171
6 to 7: 0.908969210174029
7 to 8: 0.795790078666619
8 to 9: 0.750880202220818
9 to 10: 0.660474902314397
10 to 11: 0.495585692181669
11 to 12: 0.915702479338843
12 to 13: 0.909346169273967
13 to 14: 0.801940891045435
14 to 15: 0.738723872387239
15 to 16: 0.663440059568131
16 to 17: 0.504489337822671
17 to 18: 0.899888765294772
18 to 19: 0.899876390605686
19 to 20: 0.807692307692308
Mean change 0.774781505652969
Mean derivation from above 0.101666532821939
greatest derivation from above 0.2791958134713

Going down an average of 23% per step is ok I guess. 20 or maybe even 15 would have been nicer, but 23 should work. going down to half hurts though, but I can't see a way to fix that while keeping a system a human can handle - it is too confusing for my tastes as is.

Can anyone come up with a better scheme? Less jumps in probabilities would be nice, but I would like a reduction in complexity even more.
Murtak
User avatar
Murtak
Duke
Posts: 1577
Joined: Fri Mar 07, 2008 7:54 pm

Post by Murtak »

To doublecheck my approach and for anyone interested, here is the script I used to generate those numbers. I was too lazy to work out the math, so I just rolled a couple thousand times.

Code: Select all

class Array
  def sum
    inject(0.0){|a, b| a + b}
  end
  
  def mean
    sum / length.to_f
  end
end

class Die
  DieSize = 6

  def roll
    rand(DieSize) + 1
  end
  
  def roll_and_explode
    if (result = roll) == DieSize
      result + roll_and_explode
    elsif result == (DieSize - 1)
      result + roll - 1
    else
      result
    end
  end
end

times = 100000
results = {}

times.times do
  result = Die.new.roll_and_explode
  if results[result]
    results[result] += 1
  else
    results[result] = 1
  end
end

chances = {}

(1..20).each do |current|
  non_occurrences = (1..(current-1)).inject(0){|a, b| a + (results[b] || 0)}
  chances[current] = times - non_occurrences
end

changes = []
File.open('results.txt', 'w') do |file|
  chances.keys.sort.each do |key|
    unless chances&#91;key - 1&#93;.nil? || chances&#91;key - 1&#93; < 3
      change = chances&#91;key&#93;.to_f / chances&#91;key-1&#93;.to_f
      changes << change
      file << "#&#123;key - 1&#125; to #&#123;key&#125;&#58; #&#123;change&#125;\n"
    end
  end
  mean_change = changes.mean
  derivations = changes.collect&#123;|c| &#40;c - mean_change&#41;.abs&#125;
  greatest_derivation = derivations.sort.last
  file << "Mean change #&#123;mean_change&#125;\n"
  file << "Mean derivation from above #&#123;derivations.mean&#125;\n"
  file << "greatest derivation from above #&#123;greatest_derivation&#125;\n"
end
Murtak
Post Reply